example: example.cpp
	@g++-11 -std=c++20 -fcoroutines -O3 $^ -o $@ -luring
	
example_static: example.cpp
	@g++-11 -std=c++20 -fcoroutines -static -O3 $^ -o $@ -luring

all: example

run: example 
	@./$^ resources/1.txt resources/2.txt resources/3.txt
	
timing: example
	@time --verbose ./$^ resources/1.txt resources/2.txt resources/3.txt

test: timing
benchmark: timing


example_asan: example.cpp
	@g++-11 -std=c++20 -fsanitize=address -fcoroutines $^ -o $@ -luring	

test_asan: example_asan 
	@./$^ resources/1.txt resources/2.txt resources/3.txt

clean:
	@rm example example_asan example_static
	
.: all